import { http } from '@/utils/http'
import type {
  PaymentReqParams,
  PaymentReqResult,
  mockPayParams,
  repayReqParams,
} from '@/types/payment'

export const registerMedicalAppointment = (data: PaymentReqParams) => {
  return http<PaymentReqResult>({
    method: 'POST',
    url: '/registration/registerMedicalAppointment',
    data,
  })
}

export const mockPay = (data: mockPayParams) => {
  return http<string>({
    method: 'POST',
    url: '/registration/transactionCallback',
    data,
  })
}

export const repay = (data: repayReqParams) => {
  return http<PaymentReqResult>({
    method: 'POST',
    url: '/registration/repayRegistration',
    data,
  })
}
